<div id="import"></div>
<div class="header">
<p>
Next: [[cvs: log--Print out log information for files#log&mdash;Print out log information for files|log]], Previous: [[cvs: history--Show status of files and users#history&mdash;Show status of files and users|history]], Up: [[cvs: Guide to CVS commands#Guide to CVS commands|CVS commands]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="import_002d_002d_002dImport-sources-into-CVS_002c-using-vendor-branches"></div>
=== import&mdash;Import sources into CVS, using vendor branches ===
<div id="index-import-_0028subcommand_0029"></div>



* Synopsis: import <nowiki>[</nowiki>-options<nowiki>]</nowiki> repository vendortag releasetag&hellip;

* Requires: Repository, source distribution directory.

* Changes: repository.

Use <code>import</code> to incorporate an entire source
distribution from an outside source (e.g., a source
vendor) into your source repository directory.  You can
use this command both for initial creation of a
repository, and for wholesale updates to the module
from the outside source.  See [[cvs: Tracking third-party sources#Tracking third-party sources|Tracking sources]], for
a discussion on this subject.

The <var>repository</var> argument gives a directory name
(or a path to a directory) under the <small>CVS</small> root directory
for repositories; if the directory did not exist,
import creates it.

When you use import for updates to source that has been
modified in your source repository (since a prior
import), it will notify you of any files that conflict
in the two branches of development; use &lsquo;<code>checkout
-j</code>&rsquo; to reconcile the differences, as import instructs
you to do.

If <small>CVS</small> decides a file should be ignored
(see [[cvs: Ignoring files via cvsignore#Ignoring files via cvsignore|cvsignore]]), it does not import it and prints
&lsquo;<code>I </code>&rsquo; followed by the filename (see [[cvs: import output#import output|import output]], for a
complete description of the output).

If the file &lsquo;<tt>$CVSROOT/CVSROOT/cvswrappers</tt>&rsquo; exists,
any file whose names match the specifications in that
file will be treated as packages and the appropriate
filtering will be performed on the file/directory
before being imported.  See [[cvs: The cvswrappers file#The cvswrappers file|Wrappers]].

The outside source is saved in a first-level
branch, by default 1.1.1.  Updates are leaves of this
branch; for example, files from the first imported
collection of source will be revision 1.1.1.1, then
files from the first imported update will be revision
1.1.1.2, and so on.

At least three arguments are required.
<var>repository</var> is needed to identify the collection
of source.  <var>vendortag</var> is a tag for the entire
branch (e.g., for 1.1.1).  You must also specify at
least one <var>releasetag</var> to identify the files at
the leaves created each time you execute <code>import</code>.

Note that <code>import</code> does ''not'' change the
directory in which you invoke it.  In particular, it
does not set up that directory as a <small>CVS</small> working
directory; if you want to work with the sources import
them first and then check them out into a different
directory (see [[cvs: Getting the source#Getting the source|Getting the source]]).

 [[cvs: import options#import options|&bull; import options]]::              import options
 [[cvs: import output#import output|&bull; import output]]::               import output
 [[cvs: import examples#import examples|&bull; import examples]]::             import examples


----

<div class="header">
<p>
Next: [[cvs: log--Print out log information for files#log&mdash;Print out log information for files|log]], Previous: [[cvs: history--Show status of files and users#history&mdash;Show status of files and users|history]], Up: [[cvs: Guide to CVS commands#Guide to CVS commands|CVS commands]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
